<?php
$c = $contents;
$dir = lang::get_domain_lang() == 'en' ? '' : 'dir="rtl"';
?>
<table>
    <tr>
        <td style="text-align:center;width: 234px;vertical-align:top;">
            <div id="tp_leftbar">
                <div style="text-align: center; margin-bottom: 10px;">
                    <?=ad::get_ad("left_box_1");?>
                </div>
                <h2 <?=$dir?> class="genres_bar_title"><?=lang::get('genres')?></h2>
                <ul <?=$dir?> class="genres_bar">
                    <li><a href='?tpsearch=1&title_type=tv_series'><?=lang::get('tv-series')?></a></li>
                    <li><a href='?tpsearch=1&genres=action'><?=lang::get('Action')?></a></li>
                    <li><a href='?tpsearch=1&genres=animation'><?=lang::get('Animation')?></a></li>
                    <li><a href='?tpsearch=1&genres=drama'><?=lang::get('Drama')?></a></li>
                    <li><a href='?tpsearch=1&genres=adventure'><?=lang::get('Adventure')?></a></li>
                    <li><a href='?tpsearch=1&genres=biography'><?=lang::get('Biography')?></a></li>
                    <li><a href='?tpsearch=1&genres=comedy'><?=lang::get('Comedy')?></a></li>
                    <li><a href='?tpsearch=1&genres=crime'><?=lang::get('Crime')?></a></li>
                    <li><a href='?tpsearch=1&genres=documentary'><?=lang::get('Documentary')?></a></li>
                    <li><a href='?tpsearch=1&genres=family'><?=lang::get('Family')?></a></li>
                    <li><a href='?tpsearch=1&genres=fantasy'><?=lang::get('Fantasy')?></a></li>
                    <li><a href='?tpsearch=1&genres=film_noir'><?=lang::get('Film-Noir')?></a></li>
                    <li><a href='?tpsearch=1&genres=game_show'><?=lang::get('Game-Show')?></a></li>
                    <li><a href='?tpsearch=1&genres=history'><?=lang::get('History')?></a></li>
                    <li><a href='?tpsearch=1&genres=horror'><?=lang::get('Horror')?></a></li>
                    <li><a href='?tpsearch=1&genres=music'><?=lang::get('Music')?></a></li>
                    <li><a href='?tpsearch=1&genres=musical'><?=lang::get('Musical')?></a></li>
                    <li><a href='?tpsearch=1&genres=mystery'><?=lang::get('Mystery')?></a></li>
                    <li><a href='?tpsearch=1&genres=news'><?=lang::get('News')?></a></li>
                    <li><a href='?tpsearch=1&genres=reality_tv'><?=lang::get('Reality-TV')?></a></li>
                    <li><a href='?tpsearch=1&genres=romance'><?=lang::get('Romance')?></a></li>
                    <li><a href='?tpsearch=1&genres=sci_fi'><?=lang::get('Sci-Fi')?></a></li>
                    <li><a href='?tpsearch=1&genres=sport'><?=lang::get('Sport')?></a></li>
                    <li><a href='?tpsearch=1&genres=talk_show'><?=lang::get('Talk-Show')?></a></li>
                    <li><a href='?tpsearch=1&genres=thriller'><?=lang::get('Thriller')?></a></li>
                    <li><a href='?tpsearch=1&genres=war'><?=lang::get('War')?></a></li>
                    <li><a href='?tpsearch=1&genres=western'><?=lang::get('Western')?></a></li>
                </ul>
            </div>
        </td>
        <td style="width: 20px;"> </td>
        <td style="vertical-align: top;">
            <div id="tp_mainbar2" style="width: 728px">
                <!-- SECTION for TITLE -->
                <div id="tp_header">
                    <h1 <?=$dir?> id="tp_title"><?=lang::get('home_title')?></h1>

                    <!-- MAINBANNER-->
                    <?=ad::get_ad("center_banner_1");?>
                </div>

                <p <?=$dir?>><?=lang::get('home_1')?></p>
                <p <?=$dir?>><?=lang::get('home_2')?></p>
                <p <?=$dir?>><?=lang::get('home_3')?></p>
                <div style="text-align: right">
                    <a title="Report any issues by emailing torrentportal@outlook.com" href="mailto:torrentportal@outlook.com">Report Abuse / Copyright</a>
                </div>
                <h3 <?=$dir?>><?=lang::get('home_playing')?></h3>
                <div class="tp_similar">
                    <ul>
                        <?foreach($c['playing']['movies']['results'] as $m){?>
                        <li>
                            <a 
                               title="<?=$m['title']?> <?=$m['year']?>"
                               href="?movieid=<?=$m['movieid']?>&amp;<?=$m['urltitle']?><?=str_replace("{movie}",$m['urltitle'],lang::get('seo_url_movie'));?>&amp;year=<?=$m['year']?>">
                                <div>&#9733; <?=$m['rating']?></div><img  alt="" class="lazy" src="http://<?=$res_server?>/res/img/movie.png" data-original="<?= $m['poster'] != 'http://'.$dl_server.'/dl/' ? udnutil::dlurl($m['poster']): 'http://'.$dl_server.'/res/img/no_poster.jpg'?>"/>
                            </a>
                        </li>
                        <?}?>
                    </ul>
                    <div class="tp_clear"></div><div style="text-align:right;margin-top:20px;"><a href="?<?=$c['playing']['more']?>"><?=lang::get('view_more')?></a></div>

                </div>

                <h3 <?=$dir?>><?=lang::get('home_soon')?></h3>
                <div class="tp_similar">
                    <ul>
                        <?foreach($c['soon']['movies']['results'] as $m){?>
                        <li>
                            <a 
                               title="<?=$m['title']?> <?=$m['year']?>"
                               href="?movieid=<?=$m['movieid']?>&amp;<?=$m['urltitle']?><?=str_replace("{movie}",$m['urltitle'],lang::get('seo_url_movie'));?>&amp;year=<?=$m['year']?>">
                                <div>&#9733; <?=$m['rating']?></div><img  alt="" class="lazy" src="http://<?=$res_server?>/res/img/movie.png" data-original="<?= $m['poster'] != 'http://'.$dl_server.'/dl/' ? udnutil::dlurl($m['poster']): 'http://'.$dl_server.'/res/img/no_poster.jpg'?>"/>
                            </a>
                        </li>
                        <?}?>
                    </ul>
                    <div class="tp_clear"></div><div style="text-align:right;margin-top:20px;"><a href="?<?=$c['soon']['more']?>"><?=lang::get('view_more')?></a></div>
                </div>

				<h3 <?=$dir?>><?=lang::get('home_popular')?></h3>
                <div class="tp_similar">
                    <ul>
                        <?foreach($c['popular']['movies']['results'] as $m){?>
                        <li>
                            <a 
                               title="<?=$m['title']?> <?=$m['year']?>"
                               href="?movieid=<?=$m['movieid']?>&amp;<?=$m['urltitle']?><?=str_replace("{movie}",$m['urltitle'],lang::get('seo_url_movie'));?>&amp;year=<?=$m['year']?>">
                                <div>&#9733; <?=$m['rating']?></div><img  alt="" class="lazy" src="http://<?=$res_server?>/res/img/movie.png" data-original="<?= $m['poster'] != 'http://'.$dl_server.'/dl/' ? udnutil::dlurl($m['poster']): 'http://'.$dl_server.'/res/img/no_poster.jpg'?>"/>
                            </a>
                        </li>
                        <?}?>
                    </ul>
                    <div class="tp_clear"></div><div style="text-align:right;margin-top:20px;"><a href="?<?=$c['popular']['more']?>"><?=lang::get('view_more')?></a></div>
                </div>
				
                <h3 <?=$dir?>><?=lang::get('home_highest')?></h3>
                <div class="tp_similar">
                    <ul>
                        <?foreach($c['2013']['movies']['results'] as $m){?>
                        <li>
                            <a 
                               title="<?=$m['title']?> <?=$m['year']?>"
                               href="?movieid=<?=$m['movieid']?>&amp;<?=$m['urltitle']?><?=str_replace("{movie}",$m['urltitle'],lang::get('seo_url_movie'));?>&amp;year=<?=$m['year']?>">
                                <div>&#9733; <?=$m['rating']?></div><img  alt="" class="lazy" src="http://<?=$res_server?>/res/img/movie.png" data-original="<?= $m['poster'] != 'http://'.$dl_server.'/dl/' ? udnutil::dlurl($m['poster']): 'http://'.$dl_server.'/res/img/no_poster.jpg'?>"/>
                            </a>
                        </li>
                        <?}?>
                    </ul>
                    <div class="tp_clear"></div><div style="text-align:right;margin-top:20px;"><a href="?<?=$c['2013']['more']?>"><?=lang::get('view_more')?></a></div>
                </div>

                <h3 <?=$dir?>><?=lang::get('home_100')?></h3>
                <div class="tp_similar">
                    <ul>
                        <?foreach($c['top100']['movies']['results'] as $m){?>
                        <li>
                            <a 
                               title="<?=$m['title']?> <?=$m['year']?>"
                               href="?movieid=<?=$m['movieid']?>&amp;<?=$m['urltitle']?><?=str_replace("{movie}",$m['urltitle'],lang::get('seo_url_movie'));?>&amp;year=<?=$m['year']?>">
                                <div>&#9733; <?=$m['rating']?></div><img  alt="" class="lazy" src="http://<?=$res_server?>/res/img/movie.png" data-original="<?= $m['poster'] != 'http://'.$dl_server.'/dl/' ? udnutil::dlurl($m['poster']): 'http://'.$dl_server.'/res/img/no_poster.jpg'?>"/>
                            </a>
                        </li>
                        <?}?>
                    </ul>
                    <div class="tp_clear"></div><div style="text-align:right;margin-top:20px;"><a href="?<?=$c['top100']['more']?>"><?=lang::get('view_more')?></a></div>
                </div>

                <h3 <?=$dir?>><?=lang::get('home_oscar')?></h3>
                <div class="tp_similar">
                    <ul>
                        <?foreach($c['oscar']['movies']['results'] as $m){?>
                        <li>
                            <a 
                               title="<?=$m['title']?> <?=$m['year']?>"
                               href="?movieid=<?=$m['movieid']?>&amp;<?=$m['urltitle']?><?=str_replace("{movie}",$m['urltitle'],lang::get('seo_url_movie'));?>&amp;year=<?=$m['year']?>">
                                <div>&#9733; <?=$m['rating']?></div><img  alt="" class="lazy" src="http://<?=$res_server?>/res/img/movie.png" data-original="<?= $m['poster'] != 'http://'.$dl_server.'/dl/' ? udnutil::dlurl($m['poster']): 'http://'.$dl_server.'/res/img/no_poster.jpg'?>"/>
                            </a>
                        </li>
                        <?}?>
                    </ul>
                    <div class="tp_clear"></div><div style="text-align:right;margin-top:20px;"><a href="?<?=$c['title']['more']?>"><?=lang::get('view_more')?></a></div>
                </div>

                <h3 <?=$dir?>><?=lang::get('home_bestpic')?></h3>
                <div class="tp_similar">
                    <ul>
                        <?foreach($c['bestpic']['movies']['results'] as $m){?>
                        <li>
                            <a 
                               title="<?=$m['title']?> <?=$m['year']?>"
                               href="?movieid=<?=$m['movieid']?>&amp;<?=$m['urltitle']?><?=str_replace("{movie}",$m['urltitle'],lang::get('seo_url_movie'));?>&amp;year=<?=$m['year']?>">
                                <div>&#9733; <?=$m['rating']?></div><img  alt="" class="lazy" src="http://<?=$res_server?>/res/img/movie.png" data-original="<?= $m['poster'] != 'http://'.$dl_server.'/dl/' ? udnutil::dlurl($m['poster']): 'http://'.$dl_server.'/res/img/no_poster.jpg'?>"/>
                            </a>
                        </li>
                        <?}?>
                    </ul>
                    <div class="tp_clear"></div><div style="text-align:right;margin-top:20px;"><a href="?<?=$c['bestpic']['more']?>"><?=lang::get('view_more')?></a></div>
                </div>

                <h3 <?=$dir?>><?=lang::get('home_golden')?></h3>
                <div class="tp_similar">
                    <ul>
                        <?foreach($c['golden']['movies']['results'] as $m){?>
                        <li>
                            <a 
                               title="<?=$m['title']?> <?=$m['year']?>"
                               href="?movieid=<?=$m['movieid']?>&amp;<?=$m['urltitle']?><?=str_replace("{movie}",$m['urltitle'],lang::get('seo_url_movie'));?>&amp;year=<?=$m['year']?>">
                                <div>&#9733; <?=$m['rating']?></div><img  alt="" class="lazy" src="http://<?=$res_server?>/res/img/movie.png" data-original="<?= $m['poster'] != 'http://'.$dl_server.'/dl/' ? udnutil::dlurl($m['poster']): 'http://'.$dl_server.'/res/img/no_poster.jpg'?>"/>
                            </a>
                        </li>
                        <?}?>
                    </ul>
                    <div class="tp_clear"></div><div style="text-align:right;margin-top:20px;"><a href="?<?=$c['golden']['more']?>"><?=lang::get('view_more')?></a></div>
                </div>

                <h3 <?=$dir?>><?=lang::get('home_emmy')?></h3>
                <div class="tp_similar">
                    <ul>
                        <?foreach($c['emmy']['movies']['results'] as $m){?>
                        <li>
                            <a 
                               title="<?=$m['title']?> <?=$m['year']?>"
                               href="?movieid=<?=$m['movieid']?>&amp;<?=$m['urltitle']?><?=str_replace("{movie}",$m['urltitle'],lang::get('seo_url_movie'));?>&amp;year=<?=$m['year']?>">
                                <div>&#9733; <?=$m['rating']?></div><img  alt="" class="lazy" src="http://<?=$res_server?>/res/img/movie.png" data-original="<?= $m['poster'] != 'http://'.$dl_server.'/dl/' ? udnutil::dlurl($m['poster']): 'http://'.$dl_server.'/res/img/no_poster.jpg'?>"/>
                            </a>
                        </li>
                        <?}?>
                    </ul>
                    <div class="tp_clear"></div><div style="text-align:right;margin-top:20px;"><a href="?<?=$c['emmy']['more']?>"><?=lang::get('view_more')?></a></div>
                </div>

                <div style="height: 30px;">

                </div>
            </div>
        </td>
    </tr>
</table>